from selenium.webdriver.common.by import By

from base.base_action import BaseAction


class HomePage(BaseAction):
    # 特征
    username = By.ID, "freename"
    password = By.ID, "freepassword"
    button_label = By.LINK_TEXT, "hao123"
    res_text_label = By.XPATH, '//span[@class="loginError tip11"]'

    # 操作
    # def input_user(self, text):
    #     self.send_keys(self.username, text)
    #
    # def input_pw(self, text):
    #     self.send_keys(self.password, text)

    def click_button(self):
        self.click(self.button_label)

    # def res_get_text(self):
    #     return self.get_text(self.res_text_label)
